package demo1;

import java.util.Scanner;

/**
 * @author ：陈奕安（3048279304@qq.com）
 * @date ：Created in 2025/5/23 16:04
 * @description：
 * @modified By：
 * @version:
 */
public class Test {
    //第一次只出现一次的字符
    public static int firstUniqChar(String s) {
        int[] count = new int[26];
        for(int i=0;i <s.length();i++){
            char ch=s.charAt(i);
            count[ch-'a']++;
        }
        for(int i=0;i<s.length();i++){
            char ch=s.charAt(i);
            if(count[ch-'a']==1){
                return i;
            }
        }
        return -1;
    }

    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        String str=scanner.nextLine();
     /*   String[] strings=str.split(" ");

        int len=strings[strings.length-1].length();
        System.out.println(len);*/
        int index=str.lastIndexOf(" ");
        int len=str.substring(index+1).length();
        System.out.println(len);
    }

    public static void main2(String[] args) {
        Scanner scanner=new Scanner(System.in);
        String s=scanner.nextLine();
        System.out.println(firstUniqChar(s));

    }
    public static void main1(String[] args) {
    /*    String s1=new String("hello");
        String s2=new String("word");
        String s3=s1;
        System.out.println(s1==s2);
        System.out.println(s1==s3);
        System.out.println(s2==s3);*/
        String s1 = String.valueOf(1234);
        String s2 = String.valueOf(12.34);
        String s3 = String.valueOf(true);
        String s4 = String.valueOf(new Student("Hanmeimei", 18));
        System.out.println(s1);
        System.out.println(s2);
        System.out.println(s3);
        System.out.println(s4);


    }
}